Skip to main content

Delete File

AutomatR.FTP.DeleteFile

The "Delete File" activity in AutomatR is part of the FTP activities package, allowing automation processes to remove selected files from an FTP server. This activity streamlines the process of deleting files, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
User NameProvides a valid username to establish a connection with the FTP server. String variables containing the username.
PasswordProvides the password for the username to establish a connection with the FTP server. String variables containing the password.
HostProvides a valid host credential to establish a connection with the FTP server. String variables containing the host information.
Server PathProvides the server path from which you want to delete a file. For example, "/deletefile". String variables containing the server path.
Server FilesSpecifies the path of the files you want to delete using the List<String> variable data type. For example, new List<string> {"/DeleteFile/DeleteFile.docx"}. Variables containing a list of server file paths.
Miscellaneous
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Delete File" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. For example, if the delay is 1000 milliseconds or 1 sec, set it to 1.

How to use:

  1. Drag and drop the "Delete File" activity onto the workflow.
  2. Configure the properties by specifying the FTP server credentials, server path, and the list of files to be deleted.
  3. Optionally, configure the delay.
  4. Execute the workflow to delete the specified files from the FTP server.

Example: Consider an example where the "Delete File" activity is used to delete a file named "DeleteFile.docx" from the server path "/DeleteFile" on the FTP server:

Delete File:
Delay: 0
Password: "your_password"
User Name: "your_username"
Host: "ftp.yourftpserver.com"
Server Path: "/DeleteFile"
Server Files: new List<string> {"/DeleteFile/DeleteFile.docx"}

In this example, the activity deletes the "DeleteFile.docx" file from the "/DeleteFile" directory on the FTP server.